<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>Hello Thymeleaf!</title>

    <meta charset="UTF-8"/>
    <title>user</title>
    <link rel="stylesheet" th:href="@{/static/css/bootstrap.css}"></link>

</head>
<body>
    <h1>导入的excel表头必须和数据库字段一致</h1>
    <button id="downloadBtn" class="btn btn-info " type="button"><i class="fa fa-trash-o"></i> 模板下载</button>
    <br/>
    <br/>
    <br/>
    <br/>
    <form class="form-horizontal" action="/excel/importExcel" enctype="multipart/form-data" method="post">
        <input type="file" name="file">
        <input type="submit" value="以Map导入"/>
    </form>
    <br>
    <form class="form-horizontal" action="/excel/importExcelByBean" enctype="multipart/form-data" method="post">
        <input type="file" name="file">
        <input type="submit" value="以Bean导入"/>
    </form>
    <br>
    <form class="form-horizontal" action="/excel/importExcelCustom" enctype="multipart/form-data" method="post">
        <input type="file" name="file">
        <input type="submit" value="自定义导入"/>
    </form>
    <br>
    </body>
</html>

<script>
    document.getElementById("downloadBtn").click(function (){
        window.location.href="/excel/downloadTemplate"
        console.log("download")
    })
</script>